home *** CD-ROM | disk | FTP | other *** search
/ EnigmA Amiga Run 1998 July / EnigmA AMIGA RUN 29 (1998)(G.R. Edizioni)(IT)[!][issue 1998-07 & 08].iso / recent / iib122.lha / IIB / Threads / Boolean_Texture < prev    next >
Internet Message Format  |  1998-03-02  |  10KB

  1. Date:         Mon, 23 Feb 1998 13:08:30 -0500
  2. From: "Ian M. Smith" <iansmith@ncinter.net>
  3. Subject:      [IML] IFW: Boolean Texture Alpha
  4.  
  5. After thinking about it on and off for some months, I finally tried
  6. creating a Boolean texture this last weekend with limited success, and
  7. thought I would post here before putting any more work into it.  Basicly,
  8. it lets you use Subtractive objects to chop parts of a normal object away.
  9. It also fills in the edges of holes it makes, so if you take a solid
  10. sphere and stick a subtractive tube through it, you get a tunnel through
  11. the sphere and not just two holes in a hollow sphere.
  12.  
  13. The good news it that it works great in scanline or raytrace with multiple
  14. light sources, correctly handles reflections and glass and lets you use
  15. multiple subtractive and additive objects for your cookie cutting.
  16.  
  17. The bad news is shadow casting lights do... strange things.  The texture
  18. can not curently handle Imagine's reverse casting for shadowing.
  19.  
  20. The texture works by applying the Bool texture to a group of objects you
  21. wish to affect, and then selecting either Additive or Subtractive for each
  22. object.  You can use say, a closed tube to cut through a pair of infinite
  23. ground objects to put a hole complete with sides through it.  It does
  24. handle multiple additive and subtractive objects, so if your cookie-cutter
  25. is made up of several intersecting objects it joins them together instead
  26. of cutting chunks out of the cookie-cutters themselves. If that makes any
  27. sense at all.
  28.  
  29. For building an object I have found that it is easier to just use the
  30. Imagine slice command, but where I have found it of great use is with
  31. animations, where you can dynamically move a subtractive object around to
  32. do interesting things.  Makes for some nice 'flying logo' type anims.
  33.  
  34. Anyone interested in seeing a fully working version that handles shadows
  35. correctly?  I am not sure it's even possible to do this, as I don't think
  36. the information I need is included in the texture interface.  Basicly I
  37. need to know if a light ray is being used for rendering or shadow casting.
  38. If there is interest I'll try and figure out a way around it, but don't
  39. feel like banging my head against it if nobody wants it anyway. :-)
  40.  
  41.    Date:         Mon, 23 Feb 1998 17:15:35 -0500
  42.    From: Pat Connelly <pconnelly@EMAIL.MSN.COM>
  43.    I think boolean objects would be a great tool and I am interested.
  44.  
  45. If anyone wants to alpha-test it and give me some feedback you can view
  46. some example images and anims at the following URL.  The page above it has
  47. my other IFW textures, including a numerical/time counter texture. There
  48. are example images and an animation there as well.  I'd really like to
  49. know if anyone can duplicate the anim without using the Bool texture... I
  50. can't think of any other way to do that sort of effect.
  51.  
  52.  
  53.                  http://www.ian.org/IIWTextures/BetaBool.html
  54.                  --------------------------------------------
  55.  
  56.    Date:         Mon, 23 Feb 1998 17:15:35 -0500
  57.    From: Pat Connelly <pconnelly@EMAIL.MSN.COM>
  58.    Your animation is very slick indeed.  I think I know how you did it with
  59.    your texture.  I am sure someone on the list can do it without a boolean
  60.    object as there are always multiple ways to skin a cat.  Charles, are you
  61.    listening?  I will play with your texture as soon as I get a chance.
  62.    I seem to always be doing 5 things at once.  Also, your textures will be
  63.    added to the tutorial list.
  64.  
  65. This is an alpha release because not only is it not finished, it doesn't
  66. handle shadows, and I may totally re-write it if I figure out a better
  67. way. (Did that twice already)
  68.  
  69. Quick instructions:
  70.  
  71. First, I have no idea how to tell if a ray is a new ray from the camera,
  72. or a result of a reflected or transparent object hit.  So you need to use
  73. an object with a Bool texture set to "Reset".  That tells the texture that
  74. it should start all it's calculations over.  Otherwise when a ray heads
  75. off to infinity after passing through a boolean texture, it doesn't keep
  76. it's attributes when the next ray is cast.  In scanline, you can just add
  77. a CSG sphere set to Reset around the camera.  In raytrace, to handle
  78. reflections and viewing your object through refractive objects correctly
  79. you need to enclose your booleaned objects with a Reset object, making
  80. sure it does NOT intersect any of the boolean objects in the process and
  81. the camera is outside the Reset object.
  82.  
  83. To create a boolean object, you have to apply the Bool texture to all the
  84. objects you want affected.  There are two settings, an Additive setting
  85. and a Subtractive setting.  Applying Additive to an object does nothing
  86. visible to it, but simply tells the texture that this object can have
  87. pieces cut from it.  Applying Subtractive to an object makes it invisible,
  88. and any part of a Subtractive object inside it is cut away.
  89.  
  90. Limitations and potential problems:  Shadows.  Don't try it, it's ugly.
  91. Also make sure to crank up the Resolve Depth, as a complex object can end
  92. up having a lot of invisible faces a ray needs to pass through.  Also
  93. watch the crawling-ants effect you get when two faces share the exact same
  94. plane.
  95.  
  96. Thats about it.  Oh, coloring.  When Imagine renders a hole that was cut
  97. with a Subtractive object, the surface the ray is hitting is the
  98. Subtractive object.  The Bool texture remembers though which Additive
  99. object it is inside, so it can color it correctly.  Unfortunately this
  100. does not always work well for a textured object, as the color it chooses
  101. is the color of the point it first enters the Additive object.  You can
  102. fix this by turning of this feature and having the inner surface the
  103. natural color and texture of the Additive object.  There is a checkbox for
  104. this.
  105.  
  106. HEY, MIKE H!
  107.  
  108. I would love to see boolean objects in Imagine.  Writing it into the
  109. software would work well, as you have access to everything.  You could
  110. eliminate the need for everything but a "Subtractive" checkbox somewhere
  111. in object properties.  All that would be needed is to have Imagine check
  112. for boolean faces before normal ones, and to allow a ray to hit all the
  113. faces in 'stack' at one spot instead of picking one and skipping the rest.
  114. It could even do a better job than mine for cutting into objects with
  115. textures, as it could grab the texture data for an object which I can't
  116. do.
  117.  
  118. Anyway, sorry for any confusing stuff in there.. I don't write
  119. instructions well.  Feel free to ask for any clarifications if I got
  120. anybody confused.  Also in beta is a texture that fades in a solid color
  121. at a certain distance fom the camera to eliminate the moire effect. It is
  122. done, just needs docs.
  123.  
  124. ----------------------------------
  125.  
  126. Date:         Mon, 23 Feb 1998 17:46:15 -0500
  127. From: "Ian M. Smith" <iansmith@NCINTER.NET>
  128.  
  129. On Mon, 23 Feb 1998, Pat Connelly wrote:
  130. > Also, your textures will be added to the tutorial list.
  131.  
  132. Cool, thanks.
  133.  
  134. I can think of one way to duplicate the effect, but it involves using the
  135. Slice command repeatidly and saving an object for each frame.  An
  136. easier method escapes me, but I'd love to hear of one as it would be
  137. one more trick to learn.  :-)
  138.  
  139. ----------------------------------
  140.  
  141. Date:         Wed, 25 Feb 1998 15:04:14 -0500
  142. From: Charles Blaquiere <blaq@INTERLOG.COM>
  143.  
  144. Ian, your Boolean texture is tantalizing! It brings to mind truly exciting
  145. animated effects. Why, my BVRE is busy rendering lovely techno animations,
  146. using just cubes! (A bunch of cubes, all parented to the same axis. Give
  147. each of them a different motion through the same space, using two
  148. keyframed states. Whenever these invisible cubes start to intersect,
  149. you'll see rectilinear, irregular shapes start to grow, evolve, and
  150. disappear. Techno eye candy done in less than 5 minutes!)
  151.  
  152. [voice of Pinky:] Oh, no... no... wait. But Brain, doesn't this require an
  153. XOR effect to leave the cubes invisible until they intersect?
  154.  
  155. [Brain:] Pinky, your capacity for stating the obvious never ceases to
  156. amaze me. Of course the texture will need an XOR mode, in addition to the
  157. "additive" and "negative" options currently available. We'll have to ask
  158. Ian whether he can easily incorporate this suggestion into his texture.
  159. But that will have to wait until the night after tomorrow.
  160.  
  161. ----------------------------------
  162.  
  163. Date:         Wed, 25 Feb 1998 19:09:22 -0500
  164. From: "Ian M. Smith" <iansmith@ncinter.net>
  165.  
  166. Got to run now, so can't post a long message.. but I liked your suggestion
  167. and have built a new version you can try out.  It has a new type called
  168. AND which does close to what you want.  It's not XOR, but should have the
  169. same effect.  If you can think of something XOR could do that AND can't,
  170. I'll try and add it too. :-)
  171.  
  172. I'll post later in more detail when I have more time.
  173.  
  174. http://www.ian.org/BetaBool.html
  175.  
  176. ----------------------------------
  177.  
  178. Date:         Sun, 22 Feb 1998 19:13:07 -0600
  179. From: "Stephen G." <sgiff@AIRMAIL.NET>
  180.  
  181. Your link does not work nor does the link on your Betabool page.
  182.  
  183. http://www.ian.org/IIWTextures/BetaBool.zip
  184.  
  185. ----------------------------------
  186.  
  187. Date:         Wed, 25 Feb 1998 21:38:47 -0500
  188. From: "Ian M. Smith" <iansmith@NCINTER.NET>
  189.  
  190. DOH! :-)
  191.  
  192. I had the file nameed wrong and gave the wrong URL to boot!  That will
  193. teach me to rush posting.
  194.  
  195. Ahem: www.ian.org/IIWTextures/BetaBool.html
  196.  
  197. ----------------------------------
  198.  
  199. Date:         Fri, 27 Feb 1998 06:03:22 -0500
  200. From: "Ian M. Smith" <iansmith@NCINTER.NET>
  201.  
  202. There is a new release of IIWBool on my web site.  You can now download
  203. it and docs at: http://www.ian.org/IIWTextures/Bool/
  204.  
  205. What has been added?  A few bug fixes, mostly relating to transparent
  206. objects so they look somewhat better now.  A minor speed increase.  And a
  207. better way of handling intersecting solids with an option to turn it off.
  208.  
  209. The Boolean texture now handles all objects with the texture as solid.
  210. This means if you have several transparent objects that intersect,
  211. internal edges are cut out.  There is a better explination and pictures on
  212. the above web page.
  213.  
  214. Shadows are still non-functional.
  215.  
  216. ----------------------------------
  217.  
  218.